package org.aplombh.java.awcing.basic.math.divisor;

import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class TheSumOfDivisor_871 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        TheSumOfDivisor sumOfDivisor = new TheSumOfDivisor();
        for (int i = 0; i < n; i++) {
            int x = scanner.nextInt();
            sumOfDivisor.divide(x);
        }
        System.out.println(sumOfDivisor.getSum());
    }
}

class TheSumOfDivisor {
    int res = 1;
    public static final int mod = (int) (1e9 + 7);
    TreeMap<Integer, Integer> primes = new TreeMap<>();

    void divide(int x) {
        for (int i = 2; i <= x / i; i++) {
            if (x % i == 0) {
                while (x % i == 0) {
                    x /= i;
                    primes.put(i, primes.containsKey(i) ? primes.get(i) + 1 : 1);
                }
            }
        }
        if (x > 1) primes.put(x, primes.containsKey(x) ? primes.get(x) + 1 : 1);
    }

    long getSum() {
        long res = 1L;
        for (Map.Entry<Integer, Integer> prime : primes.entrySet()) {
            int p = prime.getKey();
            int a = prime.getValue();
            long t = 1;
            // 秦九韶算法 Qin Jiushao algorithm
            while (a-- != 0) {
                t = (t * p + 1) % mod;
            }
            res = res * t % mod;
        }
        return res;
    }

}
